<template>
  <view class="page-container">
    <GlobalTopBar ref="topBarRef" class="topbars" :isLeft="true">
      <template #title
        ><text>{{ infoData.article_title }}</text></template
      >
    </GlobalTopBar>
    <GlobalTopBar ref="topBarRef"> </GlobalTopBar>
    <view class="page_content" v-html="infoData.content"></view>
  </view>
</template>

<script setup>
import { ref, computed, reactive } from 'vue';
import { useCounterStore } from '@/store';
import { onLoad, onShow } from '@dcloudio/uni-app';
import request from '@/utils/request';
import { formatTimestamp } from '@/utils/validate';

const store = useCounterStore();
const infoData = ref({});

// 获取协议
const getxycontentFun = async (url) => {
  infoData.value = await request(url);
};

onLoad((option) => {
  getxycontentFun(option.url);
});
</script>

<style lang="scss" scoped>
.topbars {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2;
  width: 100%;
  background-color: #ffffff;
}
.page_content {
  background-color: #fff;
  text-align: left;
  padding: 30rpx 30rpx 60rpx;
  overflow-y: auto;
}
</style>
